package com.xuyaxu.controller;

import com.xuyaxu.service.MinioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


/**
 * 类的描述
 *
 * @author xuyaxu
 * @date 2021/6/15 17:51
 */
@RestController
@RequestMapping("minio")
public class MinioController {

    @Autowired
    private MinioService minioService;


    /**
     * 文件上传
     *
     * @param file 文件
     * @return 是否成功
     */
    @GetMapping("upload")
    public void minioUpload(MultipartFile file) {
        minioService.minioUpload(file);
        //return "文件上传成功";
    }
}
